package com.csinc.generate.core.make;

import com.csinc.generate.core.database.exception.GenerationRunTimeException;
import com.csinc.generate.core.make.impl.BeetlMakeImpl;
import com.csinc.generate.core.make.impl.FreeMarkerMakeImpl;

import static com.csinc.generate.core.constant.GenCoreConstant.BEETL;
import static com.csinc.generate.core.constant.GenCoreConstant.FREEMARKER;

/**
 * Create By 郭金宝 on 2018/7/23.<br>
 */
public class IMakeFactory {
    public static IMake getMake(String parseType) {
        if (BEETL.equalsIgnoreCase(parseType)) {
            return new BeetlMakeImpl();
        }
        if (FREEMARKER.equalsIgnoreCase(parseType)) {
            return new FreeMarkerMakeImpl();
        }
        throw new GenerationRunTimeException("模板类型不支持");
    }

}
